﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SpaceFight.Units.Steering
{
	/// <summary>
	/// An enumeration of all the Steering Behaviors
	/// </summary>
	enum SBType
	{
		None,
		Seek,
		Flee,
		Arrive,
		Align,
		Face,
		Wander,
		
		Count
	}

	/// <summary>
	/// SBColl stands for Steering Behavior Collector
	/// It holds all the steering behaviors and gives easy acces to them
	/// </summary>
	static class SBColl
	{
		static private ISteeringBehavior[] m_behaviors = new ISteeringBehavior[(int)SBType.Count];

		static SBColl()
		{
			// Add new steering behaviors here and to the Enum
			m_behaviors[(int)SBType.None]   = new None();
			m_behaviors[(int)SBType.Seek]   = new Seek();
			m_behaviors[(int)SBType.Flee]   = new Flee();
			m_behaviors[(int)SBType.Arrive] = new Arrive();
			m_behaviors[(int)SBType.Align]  = new Align();
			m_behaviors[(int)SBType.Face]   = new Face();
			m_behaviors[(int)SBType.Wander] = new Wander();
		}

		static public ISteeringBehavior[] Behaviors
		{
			get
			{
				return m_behaviors;
			}
		}
	}
	class None : ISteeringBehavior
	{
		public void GetSteering(IUnit p_unit, SteeringOutput p_steeringOutput)
		{}
	}
}
